extends layout

block content
  div(class="body-background")
    input(class="big-input",v-model="searchWord",v-on:keyup.enter="search")
    button(v-on:click="search") 搜索
    br
    p 最低字数:
    input(class="small-input",v-model="wordNum")
    ul
      li(v-for="item in items")
        a(href="{{item.href}}",target="_blank") {{item.link}}
        small {{item.num}}
        hr
  script.
    new Vue({
      el: '.body-background',
      data :{
        items:[],
        searchWord: '',
        wordNum: '0'
      },
      methods: {
        search: function(){
          var that = this;
          $.post("/",{
            searchWord: this.searchWord,
            wordNum: this.wordNum
          },function(data){
            that.items = data.items;
          })
        }
      }
    });